$OpenBSD: patch-mdnsd_mdns_h,v 1.1 2015/01/16 19:39:24 sthen Exp $
--- mdnsd/mdns.h.orig	Fri Jan 16 12:35:47 2015
+++ mdnsd/mdns.h	Fri Jan 16 12:37:50 2015
@@ -28,9 +28,10 @@
 
 #include <imsg.h>
 #include <event.h>
+#include <limits.h>
 #include <string.h>
 
-#define MAXCHARSTR	MAXHOSTNAMELEN
+#define MAXCHARSTR	HOST_NAME_MAX+1
 #define MAXLABELLEN	64
 #define MAXPROTOLEN	4
 #define MDNSD_SOCKET    "/var/run/mdnsd.sock"
@@ -89,8 +90,8 @@ struct mdns_service {
 	LIST_ENTRY(mdns_service) entry;
 	char		app[MAXLABELLEN];
 	char		proto[MAXPROTOLEN];
-	char		name[MAXHOSTNAMELEN];
-	char		target[MAXHOSTNAMELEN];
+	char		name[HOST_NAME_MAX+1];
+	char		target[HOST_NAME_MAX+1];
 	u_int16_t	priority;
 	u_int16_t	weight;
 	u_int16_t	port;
@@ -135,6 +136,6 @@ int	mdns_group_reset(struct mdns *, const char *);
 int	mdns_group_add_service(struct mdns *, const char *, struct mdns_service *);
 int	mdns_group_commit(struct mdns *, const char *);
 
-void	reversstr(char [MAXHOSTNAMELEN], struct in_addr *);
+void	reversstr(char [HOST_NAME_MAX+1], struct in_addr *);
 
 #endif	/* _MDNS_H_ */
